<?php
/**
 * Some rights reserved：abc3210.com
 * Contact email:admin@abc3210.com
 */
session_start();
include_once( 'config.php' );
include_once( 'txwboauth.php' );
//检查是否登陆
if ($_SESSION["dduserid"] != NULL and $_SESSION["duoduouser"] != NULL) {
    echo "<script language=javascript>window.location='http://".URL."/center.php';</script>";
    exit;
}
else{
    $_SESSION["dduserid"] = NULL;
	$_SESSION["duoduouser"] = NULL;
}
//echo QQWB_AKEY;
$o = new WeiboOAuth(QQWB_AKEY, QQWB_SKEY);
$keys = $o->getRequestToken(QQWB_RequestToken);
$aurl = $o->getAuthorizeURL($keys['oauth_token'], false, '');
$_SESSION['keys'] = $keys;
header("Location:".$aurl);
?>